/**
 * 图片懒加载
 * @author Thousand-paper-crane
 * @returns undefined
 */
function lazyLoad(){
    var temp1= window.innerHeight || document.documentElement.clientHeight
    var temp2= document.body.scrollTop || document.documentElement.scrollTop
    var maxShowTop=temp1+temp2
    var imgObj=document.querySelectorAll('img')
    imgObj.forEach(function(item,index){
        if(item.offsetTop < maxShowTop){
            item.src=item.getAttribute('src-rel')
        }
    })
}
lazyLoad()
window.onscroll=lazyLoad